import i18n from '../../i18n/i18n'

export const tableOption = {
  border: true,
  // selection: true,
  index: false,
  indexLabel: i18n.t('brand.serialNumber'),
  stripe: true,
  menuAlign: 'center',
  menuWidth: 350,
  align: 'center',
  refreshBtn: true,
  searchSize: 'mini',
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn: false,
  props: {
    label: 'label',
    value: 'value'
  },
  column: [{
    label: i18n.t('prodList.shopName'),
    prop: 'shopName',
    width: 100,
    search: true         //  控制表格上面是否显示此类的搜索框
  },
  {
    label: i18n.t('product.prodName'),
    prop: 'prodName',
    width: 200,
    search: true
  },
  {
    label: i18n.t('product.pic'),
    prop: 'pic',
    type: 'upload',
    width: 100,
    listType: 'picture-img'
  }, {
    label: i18n.t('prodList.marketValue'),
    prop: 'oriPrice'
  }, {
    label: i18n.t('prodList.salesPrice'),
    prop: 'price'
  }, {
    width: 120,
    label: i18n.t('product.waterSoldNum'),
    prop: 'waterSoldNum',
    slot: true        //  是否有插槽
  }, {
    label: i18n.t('product.totalStocks'),
    prop: 'totalStocks'
  }, {
    width: 150,
    label: i18n.t('product.status'),
    searchSpan: 4,
    prop: 'status',
    search: true,
    slot: true,
    type: 'select',
    dicData: [
      {
        label: i18n.t('prodList.offShelf'),
        value: 0
      }, {
        label: i18n.t('prodList.onShelf'),
        value: 1
      }, {
        label: i18n.t('product.violation'),
        value: 2
      }, {
        label: i18n.t('product.pendingReview'),
        value: 3
      }
    ]
  },
  {
    label: i18n.t('product.delType'),
    slot: true,
    prop: 'deliveryMode',
    search: true,
    type: 'select',
    dicData: [
      {
        label: i18n.t('product.userPickUp'),
        value: 0
      }, {
        label: i18n.t('product.shopDelivery'),
        value: 1
      }, {
        label: i18n.t('product.sameCityDelivery'),
        value: 2
      }
    ]
  },
  {
    width: 150,
    label: i18n.t('product.isTop'),
    slot: true,
    prop: 'isTop'
    // search: true,
    // type: 'select',
    // dicData: [
    //   {
    //     label: i18n.t('publics.no'),
    //     value: 0
    //   }, {
    //     label: i18n.t('publics.yes'),
    //     value: 1
    //   }
    // ]
  }, {
    label: i18n.t('product.seq'),
    sortable: 'custom',
    prop: 'seq'
  },
  {
    label: i18n.t('product.category'),
    prop: 'categoryId',
    search: true,
    type: 'select',
    dicData: [],
    props: {
      label: 'categoryName',
      value: 'categoryId'
    },
    hide: true
  }]
}
